#include <iostream>
#include <vector>
#include <string>

using namespace std;

int main()
{
    string tmp;
    getline(cin, tmp);
    vector<string> v;
    auto left = tmp.begin(), right = tmp.begin();
    while (right != tmp.end())
    {
        if (*right == '\"')
        {
            left = ++right;
            while (*right != '\"')
            {
                ++right;
            }
            string a(left, right);
            v.push_back(a);
            ++right;
            while (right != tmp.end() && *right == ' ')
            {
                ++right;
            }
            left = right;
            continue;
        }
        else if (*right == ' ' && *left != ' ')
        {
            string a(left, right);
            v.push_back(a);
            while (right != tmp.end() && *right == ' ')
            {
                ++right;
            }
            left = right;
            continue;
        }
        ++right;
    }

    string a(left, right);
    v.push_back(a);
    cout << v.size() << endl;
    for (int i = 0; i < v.size(); ++i)
    {
        cout << v[i] << endl;
    }
    return 0;
}